<template>
	<div class="demo">
		<h1 class="ConTitle">用户反馈收集系统</h1>
		<p class="AboutConversionSystem">{{ text }}</p>
    <el-form class="noreturn">
      <label class="BText noreturn">邮箱:</label>
      <el-input class="email" @input="change($event)" v-model="email"></el-input>
    </el-form>
    <label class="BText">内容:</label>
    <el-input type="textarea" class="inputform" :autosize="{ minRows: 2, maxRows: 200}" v-model="context" @input="change($event)"></el-input>
    <el-form class="cen">
      <el-button type="primary" class="cen" round @click.native="uploadcon">提交</el-button>
    </el-form>


	</div>
</template>

<script>

	import axios from "axios";

  export default{
		data() {
			return{
				text: "这是网络风暴的民主反馈系统，用户可以反馈任何事项到网络风暴，请务必留下联系方式\n如果被采用会有通过充电的方式反馈激励",

			}
			
		},
		props: {

		  app: Object,
		},
    methods: {
      uploadcon(){
        var data = {
          "email": this.email,
          "context": this.context,
        }
        console.log(data["email"]);
        axios.post("http://127.0.0.1:8888/massage/data",data).then(function(res){
          console.log(res);
        })
      }

    },
	}
</script>

<style>
	.AboutConversionSystem
  {
    white-space: pre-wrap;
    color: #333333
  }
  .ConTitle
  {
    color: #000000;
  }
  .BText
  {
    color: #000000;
  }
  .noreturn
  {
    margin:0px;
    display: inline
  }
  .inputform
  {
    height: 200px;
  }
  .cen
  {
    text-align: center;

  }
</style>
